import React from 'react';
import { BrowserRouter, HashRouter } from 'react-router-dom';
import App from './App.js';
import { Provider } from 'react-redux';
import ReactDOM from "react-dom";
import Store, { persistor } from "./store/store";
import { PersistGate } from "redux-persist/lib/integration/react";

// const unsubscribe = Store.subscribe(()=>{
//     localStorage.setItem("LjmRout",JSON.stringify(Store.getState()))
// })

const Router = ReactDOM.render(
    <BrowserRouter>
        <Provider store={Store}>
            <PersistGate loading={null} persistor={persistor}>
                <App />
            </PersistGate>
        </Provider>
    </BrowserRouter>,
    document.getElementById("root")
);
export default Router;

